package net.tarine.gastronomi.server.model;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Index;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Text;
import com.google.gwt.user.client.rpc.IsSerializable;

@PersistenceCapable(detachable = "true")
public class ForumMessage implements IsSerializable, Serializable {
	private static final long serialVersionUID = 1339166919969254686L;

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
	private String id;
	@Persistent
	private ForumThread forumThread;
	@Persistent
	private String gasUserId;
	@Persistent(serialized = "true")
	private Text text;
	@Persistent
	@Index
	private Date creationDt;
	@Persistent
	private Date modifiedDt;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public ForumThread getForumThread() {
		return forumThread;
	}

	public void setForumThread(ForumThread forumThread) {
		this.forumThread = forumThread;
	}

	public String getGasUserId() {
		return gasUserId;
	}

	public void setGasUserId(String gasUserId) {
		this.gasUserId = gasUserId;
	}

	public Text getText() {
		return text;
	}

	public void setText(Text text) {
		this.text = text;
	}

	public Date getCreationDt() {
		return creationDt;
	}

	public void setCreationDt(Date creationDt) {
		this.creationDt = creationDt;
	}

	public Date getModifiedDt() {
		return modifiedDt;
	}

	public void setModifiedDt(Date modifiedDt) {
		this.modifiedDt = modifiedDt;
	}

}
